<!--
 * @Author: 熔岩巨兽 2141826215@qq.com
 * @Date: 2024-09-02 21:39:17
 * @LastEditTime: 2024-09-02 22:11:31
 * @LastEditors: 熔岩巨兽 2141826215@qq.com
 * @FilePath: \vue-vite-project\src\views\CommunicationMode\ProvideInject\index.vue
 * Copyright (c) 2024 by 熔岩巨兽 2141826215@qq.com, All Rights Reserved. 
-->
<template>
  <div class="ProVideInject">
    <h1>ProVideInject</h1>
    <div class="flexInfo">
      <chired1></chired1>
      <chired2></chired2>
    </div>
  </div>
</template>

<script lang="ts" setup name="ProVideInject">
import chired1 from "./chired1.vue";
import chired2 from "./chired2.vue";
import { provide, inject } from "vue";
import { ref } from "vue";
provide("chired1Provide", "我是父组件传递的数据");
provide("chired1Provide1", "我是父组件传递2的组件给的数据");
</script>

<style scoped>
.ProVideInject {
  width: 100%;
  background-color: skyblue;
}
.flexInfo {
  width: 100%;
  height: 50vh;
  display: flex;
  justify-content: space-between;
}
</style>
